import logging
from service.api.base_api import BaseApi


class WeWork(BaseApi):
    token = None

    def get_token(self):
        req = dict(
            url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken",
            method = 'GET',
            params = {
                "corpid": "ww68f9e2cc127e84cc",
                "corpsecret": "PqVyhhLDtF1_wBZPKo5pZCxCXDkU1Rk8H_5E8FCbwR0"
            },

        )

        resp = self.request(req)

        self.token = resp.json().get('access_token')
        logging.info(self.token)

